/*
 * @Author: 周海 zhouhaib@yonyou.com
 * @Date: 2022-12-15 11:23:26
 * @LastEditors: 周海 zhouhaib@yonyou.com
 * @LastEditTime: 2022-12-16 12:00:18
 */
import request from '@/utils/request'
import {DictTypeDomain} from '@/type.d/system/dictType';

// 查询字典类型列表
export function listDictType(query: DictTypeDomain) {
  return request('/system/dictType/list',{
    method: 'get',
    params: query
  })
}

// 查询字典类型详细
export function getDictType(dictId: string) {
  return request('/system/dictType/' + dictId,{
    method: 'get'
  })
}

// 新增字典类型
export function addDictType(data: DictTypeDomain) {
  return request('/system/dictType',{
    method: 'post',
    data: data
  })
}

// 修改字典类型
export function updateDictType(data: DictTypeDomain) {
  return request('/system/dictType',{
    method: 'put',
    data: data
  })
}

// 删除字典类型
export function delDictType(dictId: string) {
  return request('/system/dictType/' + dictId,{
    method: 'delete'
  })
}

// 查询字典类型列表
export function optionselect() {
  return request('/system/dictType/optionselect',{
    method: 'get'
  })
}

// 刷新字典缓存
export function refreshCache() {
  return request('/system/dictType/refreshCache',{
    method: 'delete'
  })
}


// 查询所有字典类型
export function getDictTypeOptionselect() {
  return request(`/system/dictType/optionselect`, {
    method: 'GET',
  });
}